﻿<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
	<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
	<meta http-equiv="pragma" content="no-cache" />
	<meta http-equiv="expires" content="-1" />
	<link rel="stylesheet" type="text/css" href="/site_media/css/style.css" />
	<title>Labmin - informacje o grupie usług</title>
</head>
<body>
	<div id="wrap">
		{% include "header.html" %}
		{% if request.session.user %}
			<div id="content-wrap">
				{% include "sidebar.html" %}
				<div id="main">
					<div class="box">
                		<h1>Informacje <span class="gray">o grupie usług</span></h1>
					</div>
					<div class="box" style="padding: 10px;">
						<table>
							<tr>
								<th>nazwa:</th>
								<td><b>{{ service_group.name }}</b></td>
							</tr>
							<tr>
								<th>opis:</th>
								<td>{{ service_group.description }}</td>
							</tr>
							<tr>
								<th>usługi:</th>
								<td><ul style="margin:0px; color:inherit;">
									{% for service in service_group.services.all %}
										<li><a href="/show_service/{{service.pk}}">{{ service.name }}</a></li>
									{% endfor %}
									</ul>
								</td>
							</tr>
						</table>
					</div>
					<form action="" method="post" style="margin: 0px">
						<input type="hidden" name="service_group_pk" value="{{ service_group.pk }}" />
						<div class="box" style="padding: 10px;">
							<input class="button" type="button" value="Edytuj" onclick="window.location='/service_group_form/{{service_group.pk}}'" />
							<input class="button" type="button" value="Usuń" onclick="document.forms[0].action='/delete_service_group'; document.forms[0].submit();" />
							{% if associated_with_user %}
							<input class="button" type="button" value="Usuń z moich grup" onclick="document.forms[0].action='/remove_service_group_from_admin'; document.forms[0].submit();" />
							{% else %}
							<input class="button" type="button" value="Dodaj do moich grup" onclick="document.forms[0].action='/add_service_group_to_admin'; document.forms[0].submit();" />
							{% endif %}
						</div>
					</form>
				</div>
			</div>
		{%endif%}
	</div>
	{% include "footer.html" %}
</body>
</html>
